﻿using System;
using System.Text;

namespace HslCommunication.Core.IMessage
{
	/// <summary>
	/// 富士SPB的消息内容
	/// </summary>
	// Token: 0x02000156 RID: 342
	public class FujiSPBMessage : INetMessage
	{
		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ProtocolHeadBytesLength" />
		// Token: 0x170005D7 RID: 1495
		// (get) Token: 0x06001D2C RID: 7468 RVA: 0x0008CCB4 File Offset: 0x0008AEB4
		public int ProtocolHeadBytesLength
		{
			get
			{
				return 5;
			}
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetContentLengthByHeadBytes" />
		// Token: 0x06001D2D RID: 7469 RVA: 0x0008D2B4 File Offset: 0x0008B4B4
		public int GetContentLengthByHeadBytes()
		{
			bool flag = this.HeadBytes == null;
			int result;
			if (flag)
			{
				result = 0;
			}
			else
			{
				result = Convert.ToInt32(Encoding.ASCII.GetString(this.HeadBytes, 3, 2), 16) * 2 + 2;
			}
			return result;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.CheckHeadBytesLegal(System.Byte[])" />
		// Token: 0x06001D2E RID: 7470 RVA: 0x0008CD5E File Offset: 0x0008AF5E
		public bool CheckHeadBytesLegal(byte[] token)
		{
			return true;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetHeadBytesIdentity" />
		// Token: 0x06001D2F RID: 7471 RVA: 0x00047BE1 File Offset: 0x00045DE1
		public int GetHeadBytesIdentity()
		{
			return 0;
		}

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.HeadBytes" />
		// Token: 0x170005D8 RID: 1496
		// (get) Token: 0x06001D30 RID: 7472 RVA: 0x0008D2F4 File Offset: 0x0008B4F4
		// (set) Token: 0x06001D31 RID: 7473 RVA: 0x0008D2FC File Offset: 0x0008B4FC
		public byte[] HeadBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ContentBytes" />
		// Token: 0x170005D9 RID: 1497
		// (get) Token: 0x06001D32 RID: 7474 RVA: 0x0008D305 File Offset: 0x0008B505
		// (set) Token: 0x06001D33 RID: 7475 RVA: 0x0008D30D File Offset: 0x0008B50D
		public byte[] ContentBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.SendBytes" />
		// Token: 0x170005DA RID: 1498
		// (get) Token: 0x06001D34 RID: 7476 RVA: 0x0008D316 File Offset: 0x0008B516
		// (set) Token: 0x06001D35 RID: 7477 RVA: 0x0008D31E File Offset: 0x0008B51E
		public byte[] SendBytes { get; set; }
	}
}
